﻿<UserControl x:Class="Sparkle.Wpf.Demo.UI.SparklePopup"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style x:Key="CloseButton" TargetType="Button">
            <Setter Property="HorizontalAlignment" Value="Right"/>
            <Setter Property="Width" Value="50"/>
            <Setter Property="Height" Value="25"/>

            <Setter Property="Template">
                <Setter.Value>

                    <ControlTemplate>
                        <Border x:Name="brd1" Width="22" Height="22" CornerRadius="15">
                            <TextBlock x:Name="txt1" Foreground="#222" TextAlignment="center" Text="r" FontSize="11" VerticalAlignment="center" FontFamily="Webdings"/>
                            <Border.Background>
                                <RadialGradientBrush GradientOrigin=".3, .3">
                                    <GradientStop Color="#FFF" Offset=".15"/>
                                    <GradientStop Color="#777" Offset="1"/>
                                </RadialGradientBrush>
                            </Border.Background>
                        </Border>
                    </ControlTemplate>

                </Setter.Value>
            </Setter>

        </Style>

    </UserControl.Resources>
    <Grid>
        <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="0.765" Fill="#FF8A8A8A" />

        <Border x:Name="MainBorder" CornerRadius="30" Background="#FF5C7590" Width="300" Height="170" >

            <Grid Margin="5, 7, 0, 5">
                <Grid.RowDefinitions>
                    <RowDefinition Height="25"/>
                    <RowDefinition MinHeight="100"/>
                    <RowDefinition Height="50"/>
                </Grid.RowDefinitions>

                <Button Grid.Row="0" Content="Close" Style="{StaticResource CloseButton}" Click="ButtonCloseClick" />

                <UserControl Grid.Row="1" x:Name="DialogContent" MinHeight="100" HorizontalAlignment="Stretch" ></UserControl>

                <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Stretch" Margin="2,2,15,15">
                    <Button x:Name="btnOk" Width="50" Height="30" Content="Ok" Click="ButtonOkClick" ></Button>
                    <Button x:Name="btnCancel" Width="50" Height="30" Content="Cancel" Click="ButtonCloseClick" ></Button>
                </StackPanel>
            </Grid>


        </Border>
    </Grid>
</UserControl>
